<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Xenon Boostrap Admin Panel" />
    <meta name="author" content="" />
    
    <title>用户管理</title>
    <link href="/static/image/favicon.ico" type="image/x-icon" rel="shortcut icon" />
    <link rel="stylesheet" href="/static/admin/css/fonts/linecons/css/linecons.css">
    <link rel="stylesheet" href="/static/admin/css/fonts/fontawesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/admin/css/bootstrap.css">
    <link rel="stylesheet" href="/static/admin/css/xenon-core.css">
    <link rel="stylesheet" href="/static/admin/css/xenon-forms.css">
    <link rel="stylesheet" href="/static/admin/css/xenon-components.css">
    <link rel="stylesheet" href="/static/admin/css/xenon-skins.css">
    <link rel="stylesheet" href="/static/admin/css/custom.css">

    <script src="/static/admin/js/jquery-1.11.1.min.js"></script>
    <script src="/static/js/jquery.min.js"></script>

    
    
</head>
<body class="page-body">

    <div class="settings-pane">
            
        <a href="#" data-toggle="settings-pane" data-animate="true">
            &times;
        </a>
        
        <div class="settings-pane-inner">
            
            <div class="row">
                
                <div class="col-md-4">
                    
                    <div class="user-info">
                        
                        <div class="user-image">
                            <a href="extra-普通用户.html">
                                <img src="/static/admin/images/user-2.png" class="img-responsive img-circle" />
                            </a>
                        </div>
                        
                        <div class="user-details">
                            
                            <h3>
                                <a href="">{$_SESSION['admin']['name']}</a>
                                <span class="user-status is-online"></span>
                            </h3>
                            
                            <p class="user-title">登陆时间：{:date("Y-m-d H:i:s", $_SESSION['admin']['time'])}</p>
                            
                            <div class="user-links">
                                <a href="/admin/Login/delete/id/{$_SESSION['admin']['id']}" class="btn btn-primary" style="border-radius:10px;">退出</a>
                                <a href="" class="btn btn-success" style="border-radius:10px;">修改</a>
                            </div>
                            
                        </div>
                        
                    </div>
                    
                </div>

            </div>
        
        </div>
        
    </div>
    
    <div class="page-container"><!-- add class "sidebar-collapsed" to close sidebar by default, "chat-visible" to make chat appear always -->
            
        <!-- Add "fixed" class to make the sidebar fixed always to the browser viewport. -->
        <!-- Adding class "toggle-others" will keep only one menu item open at a time. -->
        <!-- Adding class "collapsed" collapse sidebar root elements and show only icons. -->
        <div class="sidebar-menu toggle-others fixed">
            
            <div class="sidebar-menu-inner">    
                
                <header class="logo-env">
                    
                    <!-- logo -->
                    <div class="logo">
                        <a href="dashboard-1.html" class="logo-expanded">
                            <img src="/static/admin/images/logo@2x.png" width="80" alt="" />
                        </a>
                        
                        <a href="dashboard-1.html" class="logo-collapsed">
                            <img src="/static/admin/images/logo-collapsed@2x.png" width="40" alt="" />
                        </a>
                    </div>
                    
                    <!-- This will toggle the mobile menu and will be visible only on mobile devices -->
                    <div class="mobile-menu-toggle visible-xs">
                        <a href="#" data-toggle="user-info-menu">
                            <i class="fa-bell-o"></i>
                            <span class="badge badge-success">0</span>
                        </a>
                        
                        <a href="#" data-toggle="mobile-menu">
                            <i class="fa-bars"></i>
                        </a>
                    </div>
                    
                    <!-- This will open the popup with user 普通用户 settings, you can use for any purpose, just be creative -->
                    <div class="settings-icon">
                        <a href="#" data-toggle="settings-pane" data-animate="true">
                            <i class="linecons-cog"></i>
                        </a>
                    </div>
                    
                                
                </header>
                        
                
{block name="list"}
                <ul id="main-menu" class="main-menu">

                    <li>
                        <a href="web/index">
                            <i class="linecons-cog"></i>
                            <span class="title">网站数据</span>
                        </a>
                    </li><!--END 网站数据-->

                    <li class="opened active">
                        <a href="#">
                            <i class="fa-group"></i>
                            <span class="title">用户管理</span>
                        </a>
                        <ul>
                            <li >
                                <a href="/admin/index">
                                    <span class="title">用户列表</span>
                                </a>
                            </li>
                            <li>
                                <a href="/admin/index/user">
                                    <span class="title">管理员列表</span>
                                </a>
                            </li>
                            <li>
                                <a href="/admin/index/create">
                                    <span class="title" >添加管理员</span>
                                </a>
                            </li>
                        </ul>
                    </li><!--END 用户管理-->

                    <li>
                        <a href="">
                            <i class="linecons-desktop"></i>
                            <span class="title">影片管理</span>
                        </a>
                        <ul>
                            <li>
                                <a href="/admin/film/index">
                                    <span class="title">影片列表</span>
                                </a>
                            </li>
                            <li>
                                <a href="/admin/film/create">
                                    <span class="title">上新电影</span>
                                </a>
                            </li>
                            
                        </ul>
                    </li><!--END 影片管理-->

                    <li>
                        <a href="forms-native.html">
                            <i class="linecons-params"></i>
                            <span class="title">影院管理</span>
                        </a>
                        <ul>
                            <li>
                                <a href="forms-file-upload.html">
                                    <span class="title">全部影院</span>
                                </a>
                            </li>
                            <li>
                                <a href="forms-修改ors.html">
                                    <span class="title">上新影院</span>
                                </a>
                            </li>
                            <li>
                                <a href="forms-sliders.html">
                                    <span class="title">待续</span>
                                </a>
                            </li>
                        </ul>
                    </li><!--END 影院-->

                    <li>
                        <a href="extra-gallery.html">
                            <i class="linecons-beaker"></i>
                            <span class="title">订单管理</span>
                        </a>
                        <ul>
                            <li>
                                <a href="extra-icons-fontawesome.html">
                                    <span class="title">Icons</span>
                                    <span class="label label-warning pull-right">4</span>
                                </a>
                            </li>
                        </li>
                        </ul>
                    </li><!--END 订单-->

                    <li>
                        <a href="ui-widgets.html">
                            <i class="linecons-star"></i>
                            <span class="title">暂定</span>
                        </a>
                        <ul>
                            <li>
                                <a href="extra-icons-fontawesome.html">
                                    <span class="title">暂定</span>
                                    <span class="label label-warning pull-right">4</span>
                                </a>
                            </li>
                        </li>
                        </ul>
                    </li>
                    <li>
                        <a href="charts-main.html">
                            <i class="linecons-globe"></i>
                            <span class="title">Charts</span>
                        </a>
                        <ul>
                            <li>
                                <a href="charts-main.html">
                                    <span class="title">Chart Variants</span>
                                </a>
                            </li>
                            <li>
                                <a href="charts-range.html">
                                    <span class="title">Range Selector</span>
                                </a>
                            </li>
                            <li>
                                <a href="charts-sparklines.html">
                                    <span class="title">Sparklines</span>
                                </a>
                            </li>
                            <li>
                                <a href="charts-map.html">
                                    <span class="title">Map Charts</span>
                                </a>
                            </li>
                            <li>
                                <a href="charts-gauges.html">
                                    <span class="title">Circular Gauges</span>
                                </a>
                            </li>
                            <li>
                                <a href="charts-bar-gauges.html">
                                    <span class="title">Bar Gauges</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="#">
                            <i class="linecons-cloud"></i>
                            <span class="title">Menu Levels</span>
                        </a>
                        <ul>
                            <li>
                                <a href="#">
                                    <i class="entypo-flow-line"></i>
                                    <span class="title">Menu Level 1.1</span>
                                </a>
                                <ul>
                                    <li>
                                        <a href="#">
                                            <i class="entypo-flow-parallel"></i>
                                            <span class="title">Menu Level 2.1</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="entypo-flow-parallel"></i>
                                            <span class="title">Menu Level 2.2</span>
                                        </a>
                                        <ul>
                                            <li>
                                                <a href="#">
                                                    <i class="entypo-flow-cascade"></i>
                                                    <span class="title">Menu Level 3.1</span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#">
                                                    <i class="entypo-flow-cascade"></i>
                                                    <span class="title">Menu Level 3.2</span>
                                                </a>
                                                <ul>
                                                    <li>
                                                        <a href="#">
                                                            <i class="entypo-flow-branch"></i>
                                                            <span class="title">Menu Level 4.1</span>
                                                        </a>
                                                    </li>
                                                </ul>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="entypo-flow-parallel"></i>
                                            <span class="title">Menu Level 2.3</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="#">
                                    <i class="entypo-flow-line"></i>
                                    <span class="title">Menu Level 1.2</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <i class="entypo-flow-line"></i>
                                    <span class="title">Menu Level 1.3</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
{/block}
            </div>
            
        </div>
        
        <div class="main-content">
                    
            <!-- User Info, Notifications and Menu Bar -->
            <nav class="navbar user-info-navbar" role="navigation">
                <!-- Left links for user info navbar -->
                <ul class="user-info-menu left-links list-inline list-unstyled">
                    
                    <li class="hidden-sm hidden-xs">
                        <a href="#" data-toggle="sidebar">
                            <i class="fa-bars"></i>
                        </a>
                    </li>
                    

                    
                </ul>
                
                
                <!-- Right links for user info navbar -->
                <ul class="user-info-menu right-links list-inline list-unstyled">
                    
                    <li class="search-form"><!-- You can add "always-visible" to show make the search input visible -->
                        
                        <form method="get" action="extra-search.html">
                            <input type="text" name="s" class="form-control search-field" placeholder="被你发现了" />
                            
                            <button type="submit" class="btn btn-link">
                                <i class="linecons-search"></i>
                            </button>
                        </form>
                        
                    </li>
                    
                    <li class="dropdown user-普通用户">
                        <a href="#" data-toggle="dropdown">
                            <img src="/static/admin/images/user-4.png" alt="user-image" class="img-circle img-inline userpic-32" width="28" />
                            <span>
                                {$_SESSION['admin']['name']}
                                <i class="fa-angle-down"></i>
                            </span>
                        </a>
                        
                        <ul class="dropdown-menu user-普通用户-menu list-unstyled">
                            <li>
                                <a href="#settings">
                                    <i class="fa-wrench"></i>
                                    编辑
                                </a>
                            </li>
                            <li>
                                <a href="#普通用户">
                                    <i class="fa-user"></i>
                                    我的信息
                                </a>
                            </li>
                            <li class="last">
                                <a href="/admin/Login/delete/id/{$_SESSION['admin']['id']}">
                                    <i class="fa-lock"></i>
                                    退出登录
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
                
            </nav>



{block name="table"}
            <div class="page-title">
                <div class="title-env">
                    <h1 class="title">{$title}</h1>
                    <p class="description">有意见就跟我提，不要对上帝的数据发脾气。</p>
                </div>
                
                    <div class="breadcrumb-env">
                    
                                <ol class="breadcrumb bc-1">
                                    <li>
                            <a href="/admin"><i class="fa-home"></i>Home</a>
                        </li>
                                <li>
                        
                                        <a href="./index.php">{$title}</a>
                                </li>
                            <li class="active">
                        
                                        <strong>用户信息</strong>
                                </li>
                                </ol>
                                
                </div>
                    
            </div>

            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">用户列表</h3>
                </div>
                <div class="panel-body">

                <table cellspacing="0" class="table table-small-font table-bordered table-striped table-hover text-center" >
                    <thead>
                        <tr style="text-align: center;">
                            <th class="col-md-1">用户ID</th>
                            <th>手机号</th>
                            <th>性别</th>
                            <th>当前状态</th>
                            <th>积分</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    {volist name="data" id="val"}
                    <tr id="{$val['id']}">
                        <td>{$val['id']}</td>
                        <td>{$val['username']}</td>
                        <td>
                        {if($val['sex'] == 0)}女
                        {elseif($val['sex']==1)}男
                        {else($val['sex']==2)}保密
                        {/if}
                        </td>
                        <td id="{$val['id']}td">
                        {if($val['status'] == 0)}
                        <a data-id="{$val['id']}" class="status" style="cursor:pointer; color:#00f" >激活</a>
                        {else}
                        <a data-id="{$val['id']}" class="status" style="cursor:pointer; color:#f00">禁用</a>
                        {/if}
                        </td>
                        <td>{$val['integral']}</td>
                        <td>{:date("Y-m-d H:i:s", $val['time'])}</td>
                        <td class="col-md-3">
                            <a data-id="{$val['id']}" class="btn btn-info  btn-sm" data-toggle="modal" data-target="#myModal" style="border-radius:10px;">详情</a>
                            <a data-id="{$val['id']}" class="btn btn-danger dedede btn-sm" style="border-radius:10px;">删除</a>
                        </td>
                    </tr>
                    {/volist}
                    <script>
                        $('.dedede').click(function(){
                            var da = $(this).attr('data-id');
                            $.ajax({
                                type : 'get',
                                url : "{:url('index/delete')}",
                                data : "id="+da,
                                success : function(data){
                                    $("#"+da).remove();
                                }
                            })
                        })

                        $('.status').click(function(){
                            var sta = $(this).attr('data-id');
                            // console.log(sta);
                            $.ajax({
                                type : 'get',
                                url : "{:url('index/status')}",
                                data : "id="+sta,
                                success : function(data){
                                    console.log(data);
                                     if(!(data==0)){
                                        $('#'+sta+'td a' ).css('color', '#00f');
                                        $('#'+sta+'td a' ).html("激活");
                                     }else{
                                        $('#'+sta+'td a' ).css('color', '#f00');
                                        $('#'+sta+'td a' ).html("禁用");
                                     }
                                }
                            })
                        })
                    </script>
                    </tbody>
                </table>
                    共{:count($data)}条数据
                </div>
            </div>
{/block}


            <footer class="main-footer sticky footer-type-1">
                
                <div class="footer-inner">
                
                    <!-- Add your copyright text here -->
                    <div class="footer-text">
                        &copy; 2017 
                        <strong>Andong</strong> 
                        More movies <a href="#" target="_blank">蜘蛛网影视</a> - Collect from <a href="" target="_blank">蜘蛛网后台管理系统</a>
                    </div>
                    
                    

                    
                </div>
            </footer>
        </div><!--END main-content-->


        
            
        <!-- start: Chat Section -->
        <div id="chat" class="fixed">
            
            <div class="chat-inner">
            
                
                <h2 class="chat-header">
                    <a href="#" class="chat-close" data-toggle="chat">
                        <i class="fa-plus-circle rotate-45deg"></i>
                    </a>
                    
                    Chat
                    <span class="badge badge-success is-hidden">0</span>
                </h2>
                
                <script type="text/javascript">
                // Here is just a sample how to open chat conversation box
                jQuery(document).ready(function($)
                {
                    var $chat_conversation = $(".chat-conversation");
                    
                    $(".chat-group a").on('click', function(ev)
                    {
                        ev.preventDefault();
                        
                        $chat_conversation.toggleClass('is-open');
                        
                        $(".chat-conversation textarea").trigger('autosize.resize').focus();
                    });
                    
                    $(".conversation-close").on('click', function(ev)
                    {
                        ev.preventDefault();
                        $chat_conversation.removeClass('is-open');
                    });
                });
                </script>
                

            </div>

        </div>
        <!-- end: Chat Section -->
        
        
    </div>
    

    <!-- Button trigger modal -->


<!-- Modal  模态框-->

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">用户详情</h4>
      </div>
      <div class="modal-body">
        暂无数据
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-info" data-dismiss="modal" style="border-radius:10px;">离开</button>
      </div>
    </div>
  </div>
</div>
    
    




    <!-- Imported styles on this page -->
    <link rel="stylesheet" href="/static/admin/js/datatables/dataTables.bootstrap.css">

    <!-- Bottom Scripts -->
    <script src="/static/admin/js/bootstrap.min.js"></script>
    <script src="/static/admin/js/TweenMax.min.js"></script>
    <script src="/static/admin/js/resizeable.js"></script>
    <script src="/static/admin/js/joinable.js"></script>
    <script src="/static/admin/js/xenon-api.js"></script>
    <script src="/static/admin/js/xenon-toggles.js"></script>
    <script src="/static/admin/js/datatables/js/jquery.dataTables.min.js"></script>


    <!-- Imported scripts on this page -->
    <script src="/static/admin/js/datatables/dataTables.bootstrap.js"></script>
    <script src="/static/admin/js/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
    <script src="/static/admin/js/datatables/tabletools/dataTables.tableTools.min.js"></script>


    <!-- JavaScripts initializations and stuff -->
    <script src="/static/admin/js/xenon-custom.js"></script>
    {block name="myjs"}{/block}
</body>
</html>